<template>
    <div>
        <!-- <p v-for="cate in cate_list">
            课程ID:{{cate.id}}
            <br />
            课程名称:{{cate.name}}
            <br />
        </p> -->    <!-- 层级结构之前 -->

        <!-- 层级结构展示 -->
        <ul>
            课程根目录：<li v-for="i in cate_list">
                {{i.id}}---{{i.name}}
                <ul>
                    课程内容：<li v-for="x in i.children">
                        {{x.id}}---{{x.name}}
                        <ul>
                            课程内容：<li v-for="y in x.children">
                                {{y.id}}---{{y.name}}
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>

    </div>
</template>

<script>
export default {
    data() {
        return {
            cate_list:[]
        }
    },

    mounted:function(){
        this.axios.get('http://localhost:8000/get_cate/').then(res=>{
            console.log(res.data)
            this.cate_list = res.data
        })
    }
}
</script>

<style>

</style>